<template>
  <upload-video v-if="isVideo" :value="data" :editable="false" />
  <upload-img-group v-else :value="data" :editable="false" />
</template>

<script>
import UploadImgGroup from '@/components/UploadImgGroup'
import UploadVideo from '@/components/UploadVideo'
export default {
  components: {
    UploadImgGroup,
    UploadVideo
  },
  props: {
    data: {
      type: Array,
      required: true
    }
  },
  computed: {
    isVideo() {
      return this.data.some(item => item.includes('?video'))
    }
  }
}
</script>

